<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.8/dist/vue.js" type="text/javascript"></script>
</head>
<body>
    <div id="box">
        <p>hello {{name}}</p>
    </div>

    <script>
        Vue.config.productionTip = false;

        //el和data的第一种写法
        // new Vue({
        //     el:"#box",
        //     data:{
        //         name:"苏凉"
        //     }
        // })

        //el和data的第二种写法
        const v = new Vue({
            data:function(){
                return{
                    name:"苏凉"
                }
            }
        });
        v.$mount("#box");
    </script>
</body>
</html>